package com.ymttest.database.sqlwapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtProductPspInfo;

public class YmtProductPspInfoWapper {
	SqlManager manage;

	public YmtProductPspInfoWapper() {
		manage = new SqlManager("intpro");
	}
	
	public List<YmtProductPspInfo> selectByProductId(String productId)throws InterruptedException{
		Map<String,Object> m = new HashMap<>();
		m.put("ProductId", productId);
		
		
		List<YmtProductPspInfo>  ret = manage.getSelectResults(
	            "com.ymttest.database.mapping.YmtProductPspInfoMapper.selectByProductId", m);
	    manage.commit();
	    return ret;
		
	}
	
	public int updateByPrimaryKey(YmtProductPspInfo record)throws InterruptedException{
		int count = manage.update(
	            "com.ymttest.database.mapping.YmtProductPspInfoMapper.updateByPrimaryKey", record);
	    manage.commit();
	    return count;
		
	}
	public static void main(String[] args) throws InterruptedException {
		System.out.println(new YmtProductPspInfoWapper().selectByProductId("93e89680-8b72-4642-85a6-2f8f078b85f4").get(0).getProductId());
	}
}
